package com.example.dml.singleton_pattern;

/**
 * @description:例如静态代码块的单例模式
 * @author: gaoyang
 * @date: 2021/10/23 10:09
 */
public class HungryStaticSingleton {

    private static final HungryStaticSingleton single;

    static {
        single = new HungryStaticSingleton();
    }

    public static HungryStaticSingleton getInstance(){
        return single;
    }
}
